﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core.BusinessLogic.Interfaces;
using System.ComponentModel.Composition;
using Core.DataAccess;
using Core.Common;
using Core.DataAccess.IRepositories;

namespace Core.BusinessLogic
{
    [Export(typeof(IFriendInvitationService))]
    public class FriendInvitationService : IFriendInvitationService
    {
        [Import]
        private IFriendInvitationRepository _friendInvitationRepository;

        public FriendInvitationService()
        {
            MEFManager.Compose(this);
        }

        public void SaveFriendInvitation(FriendsInvitation friendInvitation)
        {
            _friendInvitationRepository.SaveFriendInvitation(friendInvitation);
        }

        public int CountFriendRequestInvitation(int accountID)
        {
            return _friendInvitationRepository.CountFriendRequestInvitation(accountID);
        }


        public List<Int32> GetFriendsInvitationIDByBecameID(Int32 BecameFriendID)
        {
            return _friendInvitationRepository.GetFriendsInvitationIDByBecameID(BecameFriendID);
        }


        public void CleanUpFriendInvitionByBecameID(int becameID)
        {
            _friendInvitationRepository.CleanUpFriendInvitionByBecameID(becameID);
        }


        public List<int> GetFriendsInvitationIDByAccountID(int AccountID)
        {
            return _friendInvitationRepository.GetFriendsInvitationIDByAccountID(AccountID);
        }


        public List<int> GetAllFriendInvitationBecameAccountID()
        {
            return _friendInvitationRepository.GetAllFriendInvitationBecameAccountID();
        }


        public List<FriendsInvitation> GetListFriendsRequestByAccountID(int accountID)
        {
            return _friendInvitationRepository.GetListFriendsRequestByAccountID(accountID);
        }
    }
}
